package com.mark.admin.controller.v1;

import com.mark.admin.apis.LoginControllerApi;
import com.mark.admin.service.UserLoginService;

import com.mark.model.admin.pojos.AdUser;
import com.mark.model.common.dtos.ResponseResult;
import com.mark.model.user.pojos.ApUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description :  java类作用描述
 * @Author :  Markburt
 * @CreateDate :  2020/3/7$ 下午 11:58$
 * @UpdateUser :  Markburt
 * @UpdateDate :  2020/3/7$ 下午 11:58$
 * @UpdateRemark :  Project Build
 * @Version :  1.0
 */

@RestController
@RequestMapping("/login")
@SuppressWarnings("all")
public class LoginController implements LoginControllerApi {



    @Autowired
    private UserLoginService userLoginService;


    /***
     * 登录
     * @param user
     * @return
     */
    @Override
    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdUser user) {
        return userLoginService.login(user);
    }
}
